package com.zhouxiao.multithreading.kfc;

/**
 * @author 周明阳
 * mail:gqzmy@outlook.com
 * 时间:2018-03-13 17:00
 */

public class Waiter extends Thread {

    Kfc kfc;

    public Waiter(Kfc kfc) {
        this.kfc = kfc;
    }

    @Override
    public void run() {
        int size = (int) (Math.random() * 5) + 5;
        while (true) {
            kfc.prod(size);
        }
    }
}
